package com.blackcat.moredatasource.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.blackcat.moredatasource.dao.UserMapper;
import com.blackcat.moredatasource.entity.User;
import com.blackcat.moredatasource.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p> 描述 :
 * @author : blackcat
 * @date  : 2021/1/6 11:32
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

	@Autowired
	private UserMapper mapper;

	@DS("master")
	@Override
	public User getUserTest() {
		return mapper.selectById(1);
	}

	@DS("test")
	@Override
	public User getUserTest2() {
		return mapper.selectById(1);
	}

}
